/*
* created by Administrator on 2018/12/3
* 好的代码像粥一样,是得用时间和精力熬的。
*/
const mongoose = require('mongoose');
const schemas = require('./schemas');//加载Schema配置项
let createModel = (modelName,schema) => mongoose.model(modelName,schema);
const User = createModel('User',schemas.userSchema);//传入模块名称和配置项【传参类型】
const Article = createModel('Article',schemas.articleSchema);
const Translate = createModel('Translate', schemas.translateSchema)
module.exports = {
    User,
    Article,
    Translate
};
